﻿using System.Collections.Generic;
using FishFillets.Model;
using FishFillets.Model.GameItems;
using Microsoft.Xna.Framework;

namespace FishFillets.Data.levels
{
    public partial class start : BaseLevelScript
    {
        public start(ILevelAgent agent)
            : base(agent)
        {
        }

        public class _room : Item
        {
            public int uzreklnavod;
            public int qcount;
            public int qnavod1;
            public int qnavod2;
            public int kecyoceli;
            public int malanepohne;
            public int malanemuze;
            public int tlustoch;
            public int restrt;
        }
        public _room room;

        public Item zidlev;

        public class _trubka : Item
        {
            public int cinnost;
            public int pohnul;
            //public int dir;
            public int afaze;
            public int delay;
        }
        public _trubka trubka;

        public override Level models()
        {
            sound_playMusic("music/rybky04");
            Level l = new Level
            {
                Name = "start",
                Width = 29,
                Height = 27,
                Items = new List<Item>(),
                Small = small = new Fish
                {
                    Alive = true,
                    Position = new Point(8, 17),
                    Weight = ItemWeight.Fixed,
                    Strength = ItemWeight.Light,
                    Direction = FishDirection.Right,
                    ItemMap = LoadMap(new[]
                    {
                        "XXX"
                    }),
                },
                Big = big = new Fish
                {
                    Alive = true,
                    Position = new Point(19, 17),
                    Weight = ItemWeight.Fixed,
                    Strength = ItemWeight.Heavy,
                    Direction = FishDirection.Left,
                    ItemMap = LoadMap(new[]
                    {
                        "XXXX",
                        "XXXX"
                    }),
                }
            };

            // add named items
            l.Items.Add(
                room = new _room
                {
                    AssetName = "prvni-w",
                    Weight = ItemWeight.Fixed,
                    Position = new Point(0, 0),
                    ItemMap = LoadMap(new[]
                    {
                        ".............................",
                        ".............XX.XX...........",
                        "..............X.X............",
                        "..............X.X............",
                        ".XXXX.........X.X.....XX.X.XX",
                        "XXXXX.....XXXXX.X...XXXXXXXXX",
                        "XXXXXXXXXXXXXXX.XXXXXXXXXXXXX",
                        "XXXXXXXXXXXXXXX.XXXXXXXXXXXXX",
                        "XXXXXXXXXXX.....XXXXXXXXXXXXX",
                        "XXXXXXX...........XXXXXXXXXXX",
                        "XXXX.................XXXXXXXX",
                        "XXX....................XXXXXX",
                        "XXX....................XXXXXX",
                        "XXX.....................XXXXX",
                        "XXX......................XXXX",
                        "XXX........................XX",
                        "XXX..........................",
                        "XXX..........................",
                        "XXX..........................",
                        "XXXX.........................",
                        "XXXXX.....................XXX",
                        "XXXXXXX..................XXXX",
                        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                    }),
                });
            l.Items.Add(
                zidlev = new Item
                {
                    AssetName = "zidle_v",
                    Weight = ItemWeight.Light,
                    Position = new Point(20, 17),
                    ItemMap = LoadMap(new[]
                    {
                        "...X",
                        "...X",
                        "XXXX",
                        "X..X",
                        "X..X"
                    }),
                });
            l.Items.Add(
                trubka = new _trubka()
                {
                    AssetName = "val_00",
                    Direction = FishDirection.Right,
                    Weight = ItemWeight.Heavy,
                    Position = new Point(15, 0),
                    ItemMap = LoadMap(new[]
                    {
                        "X",
                        "X",
                        "X",
                        "X",
                        "X",
                        "X",
                        "X",
                        "X"
                    }),
                });

            // add non-interactive items
            l.Items.Add(
                new Item
                {
                    AssetName = "zidle_m",
                    Weight = ItemWeight.Light,
                    Position = new Point(7, 17),
                    ItemMap = LoadMap(new[]
                    {
                        "X...",
                        "X...",
                        "XXXX",
                        "X..X",
                        "X..X"
                    }),
                });
            l.Items.Add(
                new Item
                {
                    AssetName = "stul",
                    Weight = ItemWeight.Light,
                    Position = new Point(12, 18),
                    ItemMap = LoadMap(new[]
                    {
                        "XXXXXXX",
                        ".X...X.",
                        ".X...X.",
                        ".X...X.",
                    }),
                });
            l.Items.Add(
                new Item
                {
                    AssetName = "polstar",
                    Weight = ItemWeight.Light,
                    Position = new Point(8, 18),
                    ItemMap = LoadMap(new[]
                    {
                        "XXX",
                    }),
                });

            return l;
        }
    }
}
